package cn.livingCloud.controller.core.validator;

import cn.livingCloud.dto.EmployeeRelieveMemberDto;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;

/**
 * Created by DingJie on 2016/6/24.
 */
@Component
public class EmployeeRelieveMemberDtoValidator implements Validator {
    @Override
    public boolean supports(Class<?> aClass) {
        return EmployeeRelieveMemberDto.class.equals(aClass);
    }

    @Override
    public void validate(Object o, Errors errors) {
        EmployeeRelieveMemberDto memerbDto = (EmployeeRelieveMemberDto) o;
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "memberUuid", null, "请选择要解绑的微信");
    }
}
